<template>
  <div class="home-container">
    <header class="header">
      <h1>股票分析系统</h1>
    </header>
    
    
    <main class="main-content">
      <h2>欢迎使用股票分析系统</h2>
      <p>请从上方导航菜单选择您需要的功能。</p>
      <div class="feature-cards">
        <div class="card">
          <h3>AI 聊天</h3>
          <p>与AI模型进行对话，获取股票相关信息和建议。</p>
          <router-link to="/chat" class="btn">开始聊天</router-link>
        </div>
        <div class="card">
          <h3>股票管理</h3>
          <p>添加、编辑和删除您关注的股票信息。</p>
          <router-link to="/stocks" class="btn">管理股票</router-link>
        </div>
        <div class="card">
          <h3>股票分析</h3>
          <p>选择股票并向AI模型提问，获取专业分析意见。</p>
          <router-link to="/stocks/analysis" class="btn">分析股票</router-link>
        </div>
        <div class="card">
          <h3>文档转换</h3>
          <p>将AI分析结果转换为PDF、Word或PPT格式文档。</p>
          <router-link to="/document-conversion" class="btn">转换文档</router-link>
        </div>
      </div>
    </main>
  </div>
</template>

<script setup>
// 不需要额外的逻辑，纯展示组件
</script>

<style scoped>
.home-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  text-align: center;
}

.navigation {
  background-color: #34495e;
  padding: 0.5rem 1rem;
}

.navigation ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.navigation a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.navigation a:hover {
  background-color: #3498db;
}

.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn {
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 1rem;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}
</style>